/**
 * @file error_codes_inner.h
 *
 * Copyright (c) Huawei Technologies Co., Ltd. 2019-2020. All rights reserved.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#ifndef ACL_ERROR_CODES_INNER_H_
#define ACL_ERROR_CODES_INNER_H_

#include "acl/acl_base.h"

namespace acl {
constexpr const int32_t MIN_GE_ERROR_CODE = 145000;
constexpr const int32_t MAX_GE_ERROR_CODE = 545999;
constexpr const int32_t MIN_RTS_ERROR_CODE = 107000;
constexpr const int32_t MAX_RTS_ERROR_CODE = 507999;
}

#define ACL_GET_ERRCODE_RTS(innerErrCode)   (innerErrCode)
#define ACL_GET_ERRCODE_GE(innerErrCode) \
    (((((innerErrCode) >= acl::MIN_GE_ERROR_CODE) && ((innerErrCode) <= acl::MAX_GE_ERROR_CODE)) || \
    (((innerErrCode) >= acl::MIN_RTS_ERROR_CODE) && ((innerErrCode) <= acl::MAX_RTS_ERROR_CODE))) ? \
    (innerErrCode) : ACL_ERROR_GE_FAILURE)

#endif // ACL_ERROR_CODES_INNER_H_
